package com.zheng.wechat.mp.dao.model;

import java.io.Serializable;
import java.util.Date;

public class WechatMpOpenAccount implements Serializable {
    /**
     * ID
     *
     * @mbg.generated
     */
    private Integer id;

    private String appid;

    private String appsecret;

    /**
     * 第三方平台推送 : ticket
     *
     * @mbg.generated
     */
    private String ticket;

    private Date getTicketTime;

    /**
     * 平台方access_token
     *
     * @mbg.generated
     */
    private String componentAccessToken;

    /**
     * 平台方获取access_token时间
     *
     * @mbg.generated
     */
    private Date getAccessTokenTime;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getAppid() {
        return appid;
    }

    public void setAppid(String appid) {
        this.appid = appid;
    }

    public String getAppsecret() {
        return appsecret;
    }

    public void setAppsecret(String appsecret) {
        this.appsecret = appsecret;
    }

    public String getTicket() {
        return ticket;
    }

    public void setTicket(String ticket) {
        this.ticket = ticket;
    }

    public Date getGetTicketTime() {
        return getTicketTime;
    }

    public void setGetTicketTime(Date getTicketTime) {
        this.getTicketTime = getTicketTime;
    }

    public String getComponentAccessToken() {
        return componentAccessToken;
    }

    public void setComponentAccessToken(String componentAccessToken) {
        this.componentAccessToken = componentAccessToken;
    }

    public Date getGetAccessTokenTime() {
        return getAccessTokenTime;
    }

    public void setGetAccessTokenTime(Date getAccessTokenTime) {
        this.getAccessTokenTime = getAccessTokenTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", appid=").append(appid);
        sb.append(", appsecret=").append(appsecret);
        sb.append(", ticket=").append(ticket);
        sb.append(", getTicketTime=").append(getTicketTime);
        sb.append(", componentAccessToken=").append(componentAccessToken);
        sb.append(", getAccessTokenTime=").append(getAccessTokenTime);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WechatMpOpenAccount other = (WechatMpOpenAccount) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAppid() == null ? other.getAppid() == null : this.getAppid().equals(other.getAppid()))
            && (this.getAppsecret() == null ? other.getAppsecret() == null : this.getAppsecret().equals(other.getAppsecret()))
            && (this.getTicket() == null ? other.getTicket() == null : this.getTicket().equals(other.getTicket()))
            && (this.getGetTicketTime() == null ? other.getGetTicketTime() == null : this.getGetTicketTime().equals(other.getGetTicketTime()))
            && (this.getComponentAccessToken() == null ? other.getComponentAccessToken() == null : this.getComponentAccessToken().equals(other.getComponentAccessToken()))
            && (this.getGetAccessTokenTime() == null ? other.getGetAccessTokenTime() == null : this.getGetAccessTokenTime().equals(other.getGetAccessTokenTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAppid() == null) ? 0 : getAppid().hashCode());
        result = prime * result + ((getAppsecret() == null) ? 0 : getAppsecret().hashCode());
        result = prime * result + ((getTicket() == null) ? 0 : getTicket().hashCode());
        result = prime * result + ((getGetTicketTime() == null) ? 0 : getGetTicketTime().hashCode());
        result = prime * result + ((getComponentAccessToken() == null) ? 0 : getComponentAccessToken().hashCode());
        result = prime * result + ((getGetAccessTokenTime() == null) ? 0 : getGetAccessTokenTime().hashCode());
        return result;
    }
}